<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Registrar color</title>
</head>
<body>
	<f:view>
		<h:form id="color">
			<h:panelGrid columns="2">
				<h:outputText value="Nombre:" />
				<h:inputText id="Nombre" value="#{colorBean.color.nombre}" required="true">
					<f:validateLength minimum="2" maximum="50" />
				</h:inputText>
				<h:outputText value="Codigo:" />
				<h:inputText id="Codigo" value="#{colorBean.color.codigo}" required="true"></h:inputText>
				<h:outputText value="R :" />
				<h:inputText id="r" value="#{colorBean.color.r}" required="true">
				</h:inputText>
				<h:outputText value="G :" />
				<h:inputText id="G" value="#{colorBean.color.g}" required="true"></h:inputText>
				<h:outputText value="B :" />
				<h:inputText id="B" value="#{colorBean.color.b}" required="true"></h:inputText>

			</h:panelGrid>
			<h:messages />
			<br />
			<h:commandButton value="Registrar" action="#{colorBean.registrar}" />
		</h:form>
		<h:form>
		<h:commandButton value="Ver Tabla" action="tablaColor.xhtml" />
		</h:form>
		
	</f:view>
</body>
</html>